package com.guigu.service;

import org.springframework.stereotype.Component;

@Component
public class ServiceA{
    private ServiceB serviceB;
    
//    public ServiceA(ServiceB serviceB){
//        this.serviceB = serviceB;
//    }

    public void setServiceB(ServiceB serviceB) {
        this.serviceB = serviceB;
        System.out.println("A里面注入了B");
    }
}
